#include "comm.hpp"
#include<unistd.h>

int main()
{
    key_t k=GetKey();
   //创建共享内存
   int shmid=CreateShm(k,gsize);
   cout<<"server shmid"<<' '<<shmid<<endl;
   //关联共享内存
   char*start=AttachShm(shmid);
      sleep(5);
    //去关联
    DetachShm(start);
    //删除内存
    DelShm(shmid);
    return 0;
}